package cn.jy.boot.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
@PreAuthorize("hasRole('userAdmin')")
public class UserController {
    @RequestMapping("/add")
    public String userAdd(){
        return"user add";
    }

    @RequestMapping("/remove")
    public String userRemove(){
        return"user Remove";
    }

    @RequestMapping("/list")
    public String userList(){
        return"user List";
    }
}
